/**
 * 系统用户查看js
 */
var type={
    SAFETY_PAY_BACK:"回款划拔",
    SAFETY_CLOSE_ACCOUNT:"销户"
}
var chgLogSafety = {
    key:"ChgLog_key_",
    dataCache : null,

    startEvent : function() {
        chgLogSafety.showInfoById();
    },

    showInfoById : function() {
        var id= art.dialog.data('lokId'); // 修改id

        var key = chgLogSafety.key + id;
        var record = eval('(' + localStorage.getItem(key) + ')');

        var beforeImage =eval('(' +  record.beforeImg+ ')');

        var afterImage =eval('(' +  record.afterImg+ ')');

        for(var i in beforeImage){
            var textBf=beforeImage[i];
            var textAf=afterImage[i];
            if(i=='keyName'){
                textBf=type[textBf];
                textAf=type[textAf];
            }

            $('#com-addForm td[name="'+i+'"]').html(textBf);
            $('#com-addForm td[name="'+i+'Af"]').html(textAf);
            if(textAf !=textBf){
                $('#com-addForm td[name="'+i+'Ch"]').html("已修改");
            }

        }
    },

    init : function() {
        chgLogSafety.startEvent();
    }
}
$(document).ready(function() {
    chgLogSafety.init();
});